package org.howie.util;

import io.micrometer.common.util.StringUtils;

import java.util.HashMap;
import java.util.Map;

public class ValidateUtil {
    public static <T extends Enum<T>> T notBlank(Class<T> enumType, HashMap<String,Enum> hashMap){
        for (Map.Entry<String,Enum> entry : hashMap.entrySet()){
            if(StringUtils.isBlank(entry.getKey())){
                Enum valve = entry.getValue();
                return Enum.valueOf(enumType,valve.name());
            }
        }
        return null;
    }
}
